var module = angular.module("journal", []);

module.service('journalService', function($http) {
	this.getTestJournal = function(callback) {

		$http.get('/rest/getTestJournal').success(callback);
	};
});

module.controller("journalController", function($scope, journalService) {

	$scope.getTestJournal = function() {
		journalService.getTestJournal(function(data) {
			$scope.journalEntry = data;
		});

	};

	$scope.test = function() {
		$scope.getTestJournal();
	};
});
